package jpg3.jpg3zad5;

import java.awt.*;
import java.util.Vector;

/**
 * Autor: Daniel Michalski
 * Data: 05.07.13
 */

public class Main {
    public static void main(String[] args) {
        Vector<ColourPoint> cpoints = new Vector<ColourPoint>();
        //Vector<Point> points = cpoints;    // nie działa

        MyPoint<Integer> myPointInt = new MyPoint<Integer>(2, 3);
        System.out.println(myPointInt);

        MyPoint<Double> myPointDouble = new MyPoint<Double>(2.32, 3.321);
        System.out.println(myPointDouble);
    }
}

class ColourPoint extends Point {}



class MyPoint<T> {
    private T x;
    private T y;

    MyPoint(T x, T y) {
        this.x = x;
        this.y = y;
    }

    T getX() {
        return x;
    }

    T getY() {
        return y;
    }

    @Override
    public String toString() {
        return "MyPoint{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
